RCS file: /pack/cvsroots/wxwidgets/wxWidgets/src/unix/gsocket.cpp,v
retrieving revision 1.67.2.2
diff -u -r1.67.2.2 gsocket.cpp
|
|
|
1168 | 1168 | else |
1169 | 1169 | ret = Recv_Dgram(buffer, size); |
1170 | 1170 | |
1171 | | /* If recv returned zero, then the connection is lost, and errno is not set. |
| 1171 | /* If recv returned zero, then the connection has been gracefully closed. |
1172 | 1172 | * Otherwise, recv has returned an error (-1), in which case we have lost the |
1173 | 1173 | * socket only if errno does _not_ indicate that there may be more data to read. |
1174 | 1174 | */ |
1175 | 1175 | if (ret == 0) |
1176 | 1176 | { |
1177 | | m_error = GSOCK_IOERR; |
| 1177 | /* Make sure wxSOCKET_LOST event gets sent */ |
1178 | 1178 | m_detected = GSOCK_LOST_FLAG; |
1179 | | Close(); |
1180 | | // Signal an error for return |
1181 | | return -1; |
| 1179 | Detected_Read(); |
| 1180 | return 0; |
1182 | 1181 | } |
1183 | 1182 | else if (ret == -1) |
1184 | 1183 | { |