File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,9 @@ class async_response {
3030
3131 private:
3232 margo_instance_ref m_mid;
33- margo_request m_request;
34- hg_handle_t m_handle;
35- bool m_ignore_response;
33+ margo_request m_request = MARGO_REQUEST_NULL ;
34+ hg_handle_t m_handle = HG_HANDLE_NULL ;
35+ bool m_ignore_response = false ;
3636
3737 /* *
3838 * @brief Constructor. Made private since async_response
@@ -53,6 +53,9 @@ class async_response {
5353 }
5454
5555 public:
56+
57+ async_response () = default ;
58+
5659 /* *
5760 * @brief Copy constructor is deleted.
5861 */
@@ -107,6 +110,8 @@ class async_response {
107110 * @return a packed_data containing the response.
108111 */
109112 packed_data<> wait () {
113+ if (m_handle == HG_HANDLE_NULL)
114+ throw exception (" Calling wait on an invalid async_response" );
110115 hg_return_t ret;
111116 if (m_request != MARGO_REQUEST_NULL) {
112117 ret = margo_wait (m_request);
You can’t perform that action at this time.
0 commit comments