diff --git a/src/http_stream.cpp b/src/http_stream.cpp index 1f3d138d..c71a7f47 100644 --- a/src/http_stream.cpp +++ b/src/http_stream.cpp @@ -258,10 +258,11 @@ public: //_write(s, head, 0); if (!close_all_sockets) _write(s, ", \n", 0); int n = _write(s, outputbuf, outlen); - if (n < outlen) + if (n < (int)outlen) { cerr << "JSON_sender: kill client " << s << endl; - ::shutdown(s, 2); + close_socket(s); + //::shutdown(s, 2); FD_CLR(s, &master); } @@ -448,7 +449,7 @@ public: cv::imencode(".jpg", frame, outbuf, params); //REMOVED FOR COMPATIBILITY // https://docs.opencv.org/3.4/d4/da8/group__imgcodecs.html#ga292d81be8d76901bff7988d18d2b42ac //std::cerr << "cv::imencode call disabled!" << std::endl; - size_t outlen = outbuf.size(); + int outlen = static_cast(outbuf.size()); #ifdef _WIN32 for (unsigned i = 0; i