aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/socket.c b/net/socket.c
index 18af2ab5f3..b4c5a042a9 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -448,9 +448,9 @@ static NetSocketState *net_socket_fd_init(NetClientState *peer,
case SOCK_STREAM:
return net_socket_fd_init_stream(peer, model, name, fd, is_connected);
default:
- /* who knows ... this could be a eg. a pty, do warn and continue as stream */
- fprintf(stderr, "qemu: warning: socket type=%d for fd=%d is not SOCK_DGRAM or SOCK_STREAM\n", so_type, fd);
- return net_socket_fd_init_stream(peer, model, name, fd, is_connected);
+ error_report("socket type=%d for fd=%d must be either"
+ " SOCK_DGRAM or SOCK_STREAM", so_type, fd);
+ closesocket(fd);
}
return NULL;
}