Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit62a3bb5

Browse files
committed
Correctly handle error of output socket in sockhub
1 parent2ec3827 commit62a3bb5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎contrib/multimaster/sockhub/sockhub.c‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,14 @@ void ShubLoop(Shub* shub)
335335
for (j=0;j<n;j++) {
336336
i=events[j].data.fd;
337337
if (events[j].events&EPOLLERR) {
338-
if (i!=shub->input&&i!=shub->output) {
338+
if (i==shub->input) {
339+
shub->params->error_handler("Input socket error",SHUB_FATAL_ERROR);
340+
}elseif (i==shub->output) {
341+
reconnect(shub);
342+
}else {
339343
notify_disconnect(shub,i);
344+
close_socket(shub,i);
340345
}
341-
close_socket(shub,i);
342346
}elseif (events[j].events&EPOLLIN) {
343347
#else
344348
for (i=0;i <=max_fd;i++) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp